package com.tueye.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.ISysDicDao;
import com.tueye.entity.SysDic;
import com.tueye.entity.SysDicValue;
import com.tueye.service.ISysDicService;
import com.tueye.service.exception.TuEyeServiceException;
/**
 * 
 * @author hanxiaowei
 *
 */
@Scope("prototype")
@Component("sysDicService")
public class SysDicServiceImpl extends BaseService implements ISysDicService {

	
	@Autowired
	@Qualifier("sysDicDao")
	private ISysDicDao sysDicDao;
	
	@Override
	public void addSysDic(SysDic sysDic) throws TuEyeServiceException {

		sysDicDao.addSysDic(sysDic);
	}

	@Override
	public void delSysDic(String id) throws TuEyeServiceException {

		sysDicDao.delSysDic(id);
	}

	@Override
	public SysDic getSysDicById(String id) throws TuEyeServiceException {

		return sysDicDao.getSysDicById(id);
	}

	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values) throws TuEyeServiceException {

		return sysDicDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}

	@Override
	public void addSysDicValue(SysDicValue sysDicValue)
			throws TuEyeServiceException {
		sysDicDao.addSysDicValue(sysDicValue);
		
	}

	@Override
	public SysDicValue getSysDicValueById(String id)
			throws TuEyeServiceException {

		return sysDicDao.getSysDicValueById(id);
	}

	@Override
	public void delSysDicValue(String id) throws TuEyeServiceException {
		sysDicDao.delSysDicValue(id);
	}

	@Override
	public void delSysDicBySysDicValue(String hql) throws TuEyeServiceException {
		sysDicDao.delSysDicBySysDicValue(hql);
		
	}

}
